package tgc.edu.examxy.repository;

import java.util.List;
import java.util.UUID;

import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import tgc.edu.examxy.custom.CommonRepository;
import tgc.edu.examxy.entity.Evaluation;
import tgc.edu.examxy.entity.EvaluationRule;
@Repository
public interface EvaluationRepository extends CommonRepository<Evaluation, UUID>{

	public Evaluation findByEvaluationRuleAndEvaluationXzId(EvaluationRule rules, UUID id);
	
	@Query(value="UPDATE \"EVALUATION\" SET POSTGRADE = ?2 WHERE id = ?1",nativeQuery=true)
	public void UpdatePostgrade(UUID fromString, Integer numbers);

	public List<Evaluation> findByEvaluationRule(EvaluationRule rules);

}
